import { RouteRecordRaw } from "vue-router"
import Home from "@pages/home.vue";
import Document from "@pages/document.vue";

export const routes = [
    {
        path: '/',
        name: '/',
        component: Home,
        meta: {
            title: '首页', icon: 'logo'
        }
    },
    {
        path: '/home/:product',
        redirect: '/'
    },
    {
        path: '/document',
        component: () => import('@pages/myDocument.vue'),
        meta: { title: '文档' }
    },
    {
        path: '/mall',
        component: () => import('@pages/mall.vue'),
        meta: { title: '商城' }
    },
    {
        path: '/contactUs',
        component: () => import('@pages/contactUs.vue'),
        meta: { title: '联系我们' }
    },
    {
        path: '/doctor',
        component: () => import('@pages/doctor.vue'),
        meta: {
            title: '医师介绍',
        },
        hidden: true
    },
    {
        path: '/news',
        component: () => import('@pages/news.vue'),
        meta: {
            title: '新闻中心',
        },
        hidden: true
    },
    {
        path: '/news/:document',
        component: () => import('@pages/newsDetail.vue'),
        meta: {
            title: '文章内容',
        },
        hidden: true
    },
    {
        path: '/document/:topic',
        component: () => import('@pages/documentDetail.vue'),
        meta: { title: '主题首页' },
        hidden: true
    },
    {
        path: '/document/:topic/:id',
        component: Document,
        meta: { title: '主题内容' },
        hidden: true
    },
    {
        path: '/404',
        name: 'page404',
        component: () => import('@pages/404.vue'),
        meta: { title: '404' }
    },
    {
        path: '/:catchAll(.*)',
        redirect: '/404'
    }

]